package com.swpu.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.swpu.project.model.entity.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 菜单表 Mapper 接口
 * </p>
 *
 * @author ma
 * @since 2024-08-21
 */
public interface MenuMapper extends BaseMapper<Menu> {


List<String> selectPermsByUserId(Long id);

List<String> selectRoleByUseId(Long id);

Boolean updateMenuForRole(String roleId, Map<String,String> menuIds);

Boolean deleteBatchForRole(String roleId,List<String> menuIds);

Boolean addBatchForRole(String roleId,List<String> menuIds);

List<Menu> queryPageMenu(@Param("queryBy") Map<String,String> queryBy, @Param("orderBy") Map<String,Boolean> orderBy,
@Param("start") int start,@Param("end") int end);





}
